package com.neelsys.service.adapter;

import java.util.ArrayList;
import java.util.List;

import com.neelsys.domain.ui.JSONGraph;
import com.neelsys.domain.ui.JSONLink;
import com.neelsys.domain.ui.JSONNode;

public class BlankResultAdapter {

	public JSONGraph prepareJsonGraph() {

		JSONGraph graphData = new JSONGraph();

		List<JSONNode> nodeData = new ArrayList<JSONNode>();

		JSONNode node1 = new JSONNode();
		
		node1.setName("Germany");
		nodeData.add(node1);

		JSONNode node2 = new JSONNode();
		
		node2.setName("Netherlands");
		nodeData.add(node2);

		JSONNode node3 = new JSONNode();
		
		node3.setName("Denmark");
		nodeData.add(node3);
		
		JSONNode node4 = new JSONNode();
		
		node4.setName("Poland");
		nodeData.add(node4);

		graphData.setNodes(nodeData);

		List<JSONLink> linkData = new ArrayList<JSONLink>();

		JSONLink link1 = new JSONLink();
		link1.setSource(0);
		link1.setTarget(1);
		link1.setValue(20);
		linkData.add(link1);

		JSONLink link2 = new JSONLink();
		link2.setSource(1);
		link2.setTarget(2);
		link2.setValue(20);
		linkData.add(link2);
		
		JSONLink link3 = new JSONLink();
		link3.setSource(2);
		link3.setTarget(3);
		link3.setValue(20);
		linkData.add(link3);


		graphData.setLinks(linkData);

		return graphData;

	}

}
